/*
 * Copyright (C) 2004-2006  Autodesk, Inc.
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser
 * General Public License as published by the Free Software Foundation.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#ifndef FDOWCSGETCOVERAGE_H
#define FDOWCSGETCOVERAGE_H

#ifdef _WIN32
#pragma once
#endif // _WIN32

#include "FdoOwsBoundingBox.h"
#include "FdoWcsTimeSequence.h"
#include "FdoWcsXmlGlobals.h"
#include "FdoWcsGridCRS.h"

class FdoWcsGetCoverage : public FdoOwsRequest
{
protected:
	FdoWcsGetCoverage (FdoString* identifier, FdoString* format,
                                                FdoString* srsName, 
                                                FdoSize height,
		                                        FdoSize width,
		                                        FdoDouble minx, 
		                                        FdoDouble miny, 
		                                        FdoDouble maxx, 
		                                        FdoDouble maxy,
        FdoBoolean store, FdoWcsGridCRS* gridCRS, FdoWcsTimeSequence* timeSequence /*TODO: RangeSubSet*/, FdoString* version);

	virtual ~FdoWcsGetCoverage ();
	virtual void Dispose () { delete this; }

public:
    static FdoWcsGetCoverage* Create (FdoString* identifier, FdoString* format, 
        FdoString* srsName, 
        FdoSize height,
		FdoSize width,
		FdoDouble minx, 
		FdoDouble miny, 
		FdoDouble maxx, 
		FdoDouble maxy,
        FdoBoolean store = false, 
        FdoWcsGridCRS* gridCRS = NULL, 
        FdoWcsTimeSequence* timeSequence = NULL, 
        /*TODO: RangeSubSet*/
        FdoString* version = FdoWcsXmlGlobals::WcsVersion);

	virtual FdoStringP EncodeKVP();
	virtual FdoStringP EncodeXml();

private:
    // The coverage identifier, mandatory.
    FdoStringP mIdentifier;
    // The bounding box of the requested coverage, mandatory.
    FdoOwsBoundingBox* mBBox;

    // SRS
	FdoStringP mSrsName;

    // Bounding box
	FdoDouble  mMinX;
	FdoDouble  mMinY;
	FdoDouble  mMaxX;
	FdoDouble  mMaxY;

    // Height and Width param
	FdoSize mHeight;
	FdoSize mWidth;
    
    // Specify the subsets corresponding to the time instants or intervals, optional.
    FdoWcsTimeSequence* mTimeSequence;
    // TODO:Implement the range subset.
    // FdoWcsRangeSubset.

    // Specify the output format of the raster image, mandatory.
    FdoString* mFormat;
    // Specify whether response coverage should be stored, optional.
    FdoBoolean mStore;
    // Specify parameters for the coverage GridCRS, optional.
    FdoWcsGridCRSP mGridCRS;
};
typedef FdoPtr<FdoWcsGetCoverage> FdoWcsGetCoverageP;

#endif//FDOWCSGETCOVERAGE_H


